<%@ page title="" language="C#" masterpagefile="~/RealtimeSite.master" autoeventwireup="true" inherits="Manual_Punch, App_Web_kim3uyhp" %>




   <%@ Register Assembly="Heidarpour.WebControlUI" Namespace="Heidarpour.WebControlUI"
    TagPrefix="rhp" %>


<%@ Register   Assembly="AjaxControlToolkit"
    Namespace="AjaxControlToolkit"
    TagPrefix="AjaxControlToolkit" %>
    <%@ Register   Assembly="AjaxControlToolkit"
    Namespace="AjaxControlToolkit"
    TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
 <link href="css/googleapis.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        

    .card [class*=card-header-]:not(.card-header-icon):not(.card-header-text):not(.card-header-image) {
    border-radius: 3px;
      margin-top: -37px;
    padding: 7px !important;
}
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: .05rem 0rem;
    /* margin-bottom: 1rem; */
    list-style: none;
    background-color: #fff !important;
    border-radius: .25rem;
    color: #E15C11;
    font-size: 18px;
    font-weight: 500;
}
.grid-lable
{
     height:150px; 
     overflow-y:scroll; 
     border:1px solid #ddd;
     margin-left:-10px; 
     margin-right:-10px;
     padding:6px;
     
   
}
.form-check, label {
  font-size: 15px !important;
    line-height: 1.02857 !important;
    color: #333 !important;
    font-weight: 200 !important;
    padding-left: 7px !important;
    padding-top: -3px !important;
    position: relative !important;
    top: -3px !important;ortant;
    top: -3px !important;
}
.grid-lable span
{
        font-size: 15px !important;
    line-height: 1.52857 !important;
    color: #333 !important;
    font-weight: 200 !important;
    padding-left: 7px !important;
    padding-top: -3px !important;
    position: relative !important;
    top: -3px !important;
}
.grid-lable lable
{
    display: inline-block;
    margin-bottom: 0rem !important;
}
label {
    display: inline-block;
    margin-bottom: 0rem !important;
}
#inputSearch
{
        height: 21px;
    margin-top: 5px;
    margin-bottom: 8px;
    width: 100%;
}
#MainContent_Label1
{
    font-size:13px;
    font-weight:bold; 
}
#MainContent_Label2
{
    font-size:13px;
    font-weight:bold; 
}
#MainContent_lblOutTime
{
     font-size:13px;
    font-weight:bold;    
}
#MainContent_lblRemark
{
    font-size:13px;
    font-weight:bold; 
}
#MainContent_Label4
{
    font-size:13px;
    font-weight:bold;
}
#MainContent_Label5
{
    font-size:13px;
    font-weight:bold;    
}
#MainContent_lblSelectionBy
{
    font-size: 15px;
    font-weight: 600;
}
.punch-btn
{
    padding-top:3px !important;
}
.panel-heading {
  
}
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
   
          <div class="main-panel">
        <div class="content">
        <div class="container" id="manualpanch" runat="server">

            <div class="row dash-pane2">
            <div class="card">
                <div class="card-header card-header-warning">
                  <h4 class="card-title"><i class="fa fa-edit fa-fw"></i><asp:Label ID="lblManualPunch" runat="server" Text="Manual Punch"></asp:Label></h4>
                </div>
                <div class="card-body table-responsive">
                <div class="row breadcrumb" style="margin-top:-15px;">
                 <b><asp:Label ID="lblSelectionBy" runat="server" Text="Selection By"></asp:Label></b>
                </div>

                <div class="row">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
   
    <ContentTemplate>
   </div>


							  <div class="row" style="margin-left:8px; margin-right:8px; margin-top:-20px; width:100%">
                              <ul class="list-inline" style="width:100%; display:contents">
                              <li style="width:17.5%; margin-left:15px;">
                              <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                    <asp:RadioButton ID="SelectAllCommany" runat="server" Checked="True" GroupName="Cmpny"
                                        Text="" AutoPostBack="True" OnCheckedChanged="SelectAllCommany_CheckedChanged" /><asp:Label
                                            ID="lblAllCompany" runat="server" Text="All Company"></asp:Label><br />
                                    <asp:RadioButton ID="FewCompany" runat="server" GroupName="Cmpny" Text="" OnCheckedChanged="FewCompany_CheckedChanged" /><asp:Label
                                        ID="lblFewCompany" runat="server" Text="Few Company"></asp:Label><br />
                                    <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox1_CheckedChanged"
                                        Text="" /><asp:Label ID="lblcompanySelectAllDeSelectAll" runat="server" Text="SelectAll/De-Select All"></asp:Label>                              
                              </div>
                                 <div class="grid-lable">

                                    <asp:CheckBoxList ID="chkcompanylist" runat="server" AutoPostBack="True" Font-Size="12px"
                                        OnSelectedIndexChanged="chkcompanylist_SelectedIndexChanged">
                                    </asp:CheckBoxList>
                                </div>                             
                              
                              </li>
                              <li style="width:17.5%; margin-left:27px;">
                              <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                     <asp:RadioButton ID="Allshift" runat="server" GroupName="shift1" Text="" Checked="True"
                                        AutoPostBack="True" OnCheckedChanged="Allshift_CheckedChanged" /><asp:Label ID="lblAllBranch"
                                            runat="server" Text="All  Branch"></asp:Label><br />
                                    <asp:RadioButton ID="Allshift1" runat="server" GroupName="shift1" Text="" AutoPostBack="True"
                                        OnCheckedChanged="Allshift1_CheckedChanged" /><asp:Label ID="lblFewBranch" runat="server"
                                            Text="Few Branch"></asp:Label><br />
                                    <asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox2_CheckedChanged"
                                        Text="" /><asp:Label ID="lblbranchSelectAllDeSelectAll" runat="server" Text="SelectAll/De-Select All"></asp:Label>                             
                              </div>
                                <div class="grid-lable">

                                    <asp:CheckBoxList ID="Chkshiftlist" runat="server" AutoPostBack="True" Font-Size="12px"
                                        OnSelectedIndexChanged="Chkshiftlist_SelectedIndexChanged">
                                    </asp:CheckBoxList>
                                   </div>                             
                              
                              </li>
                              <li style="width:17.5%; margin-left:27px;">
                              <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                    <asp:RadioButton ID="AllDesignation" runat="server" Checked="True" GroupName="Dept"
                                        Text="" OnCheckedChanged="AllDesignation_CheckedChanged" /><asp:Label ID="lblAllDepartment"
                                            runat="server" Text="All Department"></asp:Label><br />
                                    <asp:RadioButton ID="optfewDesignation" runat="server" GroupName="Dept" Text="" OnCheckedChanged="optfewdept_CheckedChanged" /><asp:Label
                                        ID="lblFewDepartment" runat="server" Text="Few Department"></asp:Label><br />
                                    <asp:CheckBox ID="CheckBox3" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox3_CheckedChanged"
                                        Text="" /><asp:Label ID="lbldeptSelectAllDeSelectAll" runat="server" Text="SelectAll/De-Select All"></asp:Label>                              
                              </div>
                           <div class="grid-lable">

                                    <asp:CheckBoxList ID="chkdepartmentlist" runat="server" AutoPostBack="True" Font-Size="12px"
                                        OnSelectedIndexChanged="chkdepartmentlist_SelectedIndexChanged">
                                    </asp:CheckBoxList>
                                </div>                              
                              </li>
                              <li style="width:17.5%; margin-left:27px;">
                              <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                     <asp:RadioButton ID="RadioButton1" runat="server" Checked="True" GroupName="Desig"
                                        Text="" OnCheckedChanged="RadioButton1_CheckedChanged" /><asp:Label ID="lblAllDesignation"
                                            runat="server" Text="All  Designation"></asp:Label><br />
                                    <asp:RadioButton ID="optFewEmployee0" runat="server" AutoPostBack="True" GroupName="Desig"
                                        OnCheckedChanged="optAllemployee_CheckedChanged" Text="" />
                                    <asp:Label ID="lblFewDesignation" runat="server" Text="Few Designation"></asp:Label><br />
                                    <asp:CheckBox ID="CheckBox4" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox4_CheckedChanged"
                                        Text="" /><asp:Label ID="lblDesignationSelectAllDeSelectAll" runat="server" Text="SelectAll/De-Select All"></asp:Label>                             
                              </div>
                               <div class="grid-lable">

                                    <asp:CheckBoxList ID="ChkDesignationList" runat="server" AutoPostBack="True" Font-Size="12px"
                                        OnSelectedIndexChanged="ChkDesignationList_SelectedIndexChanged">
                                    </asp:CheckBoxList>
                                </div>                              
                              </li>
                              <li style="width:17.5%; margin-left:27px;">
                              <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                    <asp:RadioButton ID="optAllemployee" runat="server" AutoPostBack="True" Checked="True"
                                        GroupName="Emp" OnCheckedChanged="optAllemployee_CheckedChanged" Text="" ClientIDMode="Static"
                                        onclick="sharad();" /><asp:Label ID="lblAllemployee" runat="server" Text="All  employee"></asp:Label><br />
                                    <asp:RadioButton ID="optFewEmployee" runat="server" AutoPostBack="True" GroupName="Emp"
                                        Text="" OnCheckedChanged="optFewEmployee_CheckedChanged" ClientIDMode="Static"
                                        onclick="sharad();" /><asp:Label ID="lblFewEmployee" runat="server" Text="Few Employee"></asp:Label><br />
                                    <asp:CheckBox ID="CheckBox5" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox5_CheckedChanged"
                                        Text="" ClientIDMode="Static" onclick="sharad();" /><asp:Label ID="lblemployeeSelectAllDeSelectAll"
                                            runat="server" Text="SelectAll/De-Select All"></asp:Label>
                                                               
                              </div>
                                <div class="grid-lable">
                                 <asp:TextBox runat="server" ID="inputSearch" ClientIDMode="Static" Height="21px"
                                        placeholder="Search employee" CssClass="form-control" />  
                                    <asp:CheckBoxList ID="chkemployeelist" runat="server" OnSelectedIndexChanged="chkemployeelist_SelectedIndexChanged"
                                        Font-Size="12px" ClientIDMode="Static">
                                    </asp:CheckBoxList>
                                        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
                         <script type="text/javascript">
                             $(document).ready(function () {
                                 $("#inputSearch").on("keyup", function () {
                                     var value = $(this).val().toLowerCase();
                                     $("#chkemployeelist tr").filter(function () {
                                         $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
                                     });
                                 });
                             });
                                        window.onload = function () {
                                            var tmr = false;
                                            var labels = document.getElementById('chkemployeelist').getElementsByTagName('label');
                                            var func = function () {
                                                if (tmr)
                                                    clearTimeout(tmr);
                                                tmr = setTimeout(function () {
                                                    var regx = new RegExp(document.getElementById('inputSearch').value);


                                                    for (var i = 0, size = labels.length; i < size; i++)
                                                        if (document.getElementById('inputSearch').value.length > 0) {
                                                            if (labels[i].textContent.match(regx)) setItemVisibility(i, true);
                                                            else setItemVisibility(i, false);
                                                        }
                                                        else
                                                            setItemVisibility(i, true);
                                                }, 500);

                                                function setItemVisibility(position, visible) {
                                                    if (visible) {
                                                        labels[position].style.display = '';
                                                        labels[position].previousSibling.style.display = '';
                                                        if (labels[position].nextSibling != null)
                                                            labels[position].nextSibling.style.display = '';
                                                    }
                                                    else {
                                                        labels[position].style.display = 'none';
                                                        labels[position].previousSibling.style.display = 'none';
                                                        if (labels[position].nextSibling != null)
                                                            labels[position].nextSibling.style.display = 'none';

                                                    }
                                                }
                                            }

                                            if (document.attachEvent) document.getElementById('inputSearch').attachEvent('onkeypress', func);  // IE compatibility
                                            else document.getElementById('inputSearch').addEventListener('keydown', func, false); // other browsers
                                        };


                                        function sharad() {
                                            var tmr = false;

                                            var labels = document.getElementById('chkemployeelist').getElementsByTagName('label');
                                            var func = function () {
                                                if (tmr)
                                                    clearTimeout(tmr);
                                                tmr = setTimeout(function () {
                                                    var regx = new RegExp(document.getElementById('inputSearch').value);


                                                    for (var i = 0, size = labels.length; i < size; i++)
                                                        if (document.getElementById('inputSearch').value.length > 0) {
                                                            if (labels[i].textContent.match(regx)) setItemVisibility(i, true);
                                                            else setItemVisibility(i, false);
                                                        }
                                                        else
                                                            setItemVisibility(i, true);
                                                }, 500);

                                                function setItemVisibility(position, visible) {
                                                    if (visible) {
                                                        labels[position].style.display = '';
                                                        labels[position].previousSibling.style.display = '';
                                                        if (labels[position].nextSibling != null)
                                                            labels[position].nextSibling.style.display = '';
                                                    }
                                                    else {
                                                        labels[position].style.display = 'none';
                                                        labels[position].previousSibling.style.display = 'none';
                                                        if (labels[position].nextSibling != null)
                                                            labels[position].nextSibling.style.display = 'none';

                                                    }
                                                }
                                            }


                                            if (document.attachEvent) document.getElementById('inputSearch').attachEvent('onkeypress', func);  // IE compatibility
                                            else document.getElementById('inputSearch').addEventListener('keydown', func, false); // other browsers
                                        }



                                    </script>
                                </div>                              
                              </li>
                              </ul>


                            </div>


                              
</ContentTemplate>

   </asp:UpdatePanel> 
               
                <div class="row" style="margin-left:-15px; margin-right:0px; margin-top:15px;">
                  <div class="col-lg-6">
                   <div class="panel panel-primary">
                   <div class="panel-heading" style="padding: 2px;font-size: 15px;padding-left: 10px;"><div class="row"><div class="col-lg-5"><asp:Label ID="lblManualPunchEntry" runat="server" Text="Manual Punch Entry"></asp:Label></div>
                   <div class="col-lg-7"><asp:Label ID="lblTimeFormat" runat="server" Text="Time Format Should be (HH:MM) in 24 Hrs"></asp:Label></div>
                   </div></div>
                  <div class="panel-body" style="background:#eee; padding-bottom:23px; padding-left: 15px; padding-right:15px">
                   <div class="row" style="margin-top:0px; padding-top:10px;">
                       <div class="col-lg-4">
                         <asp:Label ID="Label1" runat="server" Text="Date" ></asp:Label><br />

                       <asp:Panel ID="PanelTxtPunchDate" runat="server" Visible="false">
                            <rhp:DatePicker ID="TxtPunchDate1" runat="server" DatePersian="" CalendarType="Persian"  
        BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" ShowWeekNumbers="True"
        FirstDayOfWeek="Monday" ShowOthers="True" ></rhp:DatePicker>
                            </asp:Panel>

                       
                       
                       
                       
                       
                         <asp:TextBox CssClass="form-control" ID="TxtPunchDate" 
          runat="server" autocomplete="off"  class="form-control" height="32px"></asp:TextBox>
          <AjaxControlToolkit:calendarextender ID="txtDate0_CalendarExtender" runat="server" 
        TargetControlID="TxtPunchDate"  Format="dd/MM/yyyy" />


                         </div>
             
                          <div class="col-lg-4">
                          <asp:Label ID="Label2" runat="server" Text="IN-Time" ></asp:Label>
                          <asp:TextBox ID="txttime" runat="server" class="form-control"
                ontextchanged="txttime_TextChanged" height="32px"></asp:TextBox>
       
                         
                         </div>
                          <div class="col-lg-4">
                          <asp:Label ID="lblOutTime" runat="server" Text="Out Time"></asp:Label>
                         <asp:TextBox ID="TxtOutTime" runat="server" class="form-control" 
                                 height="32px"></asp:TextBox>
                                  
                         </div>
        
                          <div class="col-lg-9" >
                         <asp:Label ID="lblRemark" runat="server" Text="Remark"></asp:Label>
                         <asp:TextBox ID="txtremark" runat="server" class="form-control" 
                                 height="32px"></asp:TextBox>
                                  
                         </div>
                         <br />

                          <div class="col-lg-2">
                          <br />
                    <asp:Button ID="cmdsave" runat="server" Text="Insert Punch"  OnClick="cmdsave_Click" 
        type="button" class="btn btn-success punch-btn" height="32px" /><i class="fa fa-plus;"></i>
                         </div>
                         <asp:Label ID="Label3" runat="server" ForeColor="Red"></asp:Label>

                         </div>
                  
                  </div>
                 </div>
                  
                  </div>
                   <div class="col-lg-6">
                    <div class="panel panel-primary" style="width:100%">
             <div class="panel-heading" style="padding: 2px;font-size: 15px;padding-left: 10px;">
             <div class="row">
    
              <div class="col-lg-12">
                  <asp:Label ID="Label6" runat="server" Text="View Punch"></asp:Label></div>
             </div>
             </div>
            <div class="panel-body" style="background:#eee; padding-bottom:0px;padding-left: 15px; padding-right:15px">
     
    <div class="row" style="margin-right:-20px; padding-top:10px;">
                <div class="col-lg-3">
                       
                           <asp:Label ID="Label4" runat="server" Text="From Date:"></asp:Label><br />
                                <asp:Panel ID="Paneltxtfromdate" runat="server" Visible="false">
                            <rhp:DatePicker ID="txtfromdate1" runat="server" DatePersian="" CalendarType="Persian"  
        BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" ShowWeekNumbers="True"
        FirstDayOfWeek="Monday" ShowOthers="True"  CssClass="form-control" Height="32px"></rhp:DatePicker>
                            </asp:Panel>






                             <asp:TextBox CssClass="form-control" ID="txtfromdate" 
          runat="server" autocomplete="off" Height="32px"></asp:TextBox>
          <AjaxControlToolkit:calendarextender ID="Calendarextender1" runat="server" 
        TargetControlID="txtfromdate"  Format="dd/MM/yyyy" />


                       </div>
                         <div class="col-lg-3">         
                              <asp:Label ID="Label5" runat="server" Text="To Date:"></asp:Label><br />
                              
                                  <asp:Panel ID="Paneltxttodate" runat="server" Visible="false">
                            <rhp:DatePicker ID="txttodate1" runat="server" DatePersian="" CalendarType="Persian"  
        BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" ShowWeekNumbers="True"
        FirstDayOfWeek="Monday" ShowOthers="True" ></rhp:DatePicker>
                            </asp:Panel>
             
                               <asp:TextBox CssClass="form-control" ID="txttodate" 
          runat="server" autocomplete="off"  class="form-control" Height="32px"></asp:TextBox>
          <AjaxControlToolkit:calendarextender ID="Calendarextender2" runat="server" 
        TargetControlID="txttodate"  Format="dd/MM/yyyy" /></div>
            <div class="col-lg-2" style="margin-top:20px; margin-left:-10px">
                           
                      <asp:Button ID="Button1" runat="server" Text="View Punch"  OnClick="Button1_Click"
        type="button" class="btn btn-success punch-btn" Height="32px"/>  
            </div>
            <div class="col-lg-4" style=" margin-top:28px; position:relative; left:20px;">
            <asp:CheckBox ID="ChkManualPunch" runat="server" Text="Show Manual Punch" 
                          Checked="True" /><i class="fa fa-plus;"></i>
            </div>
                </div>
                       

                <div class="row" style="margin-left:0px; margin-right:0px; margin-top:15px;">
                <div class="table-responsive" style="height:300px; overflow:auto">
                 <asp:GridView ID="Grid1" runat="server" class="table table-bordered table-hover table-striped"
          AutoGenerateColumns="False"  DataKeyNames="Rwid" 
                            onselectedindexchanged="Grid1_SelectedIndexChanged">
         
         
          <Columns>
              <asp:TemplateField HeaderText="Select" ItemStyle-Width="30px">
                 
                  <ItemTemplate>
                      <asp:CheckBox ID="cbRows" runat="server" />
                  </ItemTemplate>
                
              </asp:TemplateField>
             
                <asp:BoundField DataField="Cardno" HeaderText="Cardno" SortExpression="Father Name" ItemStyle-Width="80px" >
               
                
            </asp:BoundField>
               <asp:BoundField DataField="Dept_Name" HeaderText="Department" SortExpression="Father Name" ItemStyle-Width="90px">
               
                
            </asp:BoundField>
           
            
            <asp:BoundField DataField="PunchDateTime" HeaderText="PunchDateTime" SortExpression="Desig_Name" >
                
            </asp:BoundField>
           
           </Columns>
         
      </asp:GridView> 
      </div>            
                
                </div>
             
            
            </div>
             </div>
             </div>
             
                </div>
             
            
       
                <div class="row" style="margin-left:auto; margin-right:auto; display:table; margin-top:0px; margin-bottom:10px;">
                                    <asp:Button ID="cmdShowReport" runat="server" type="button" Text="Delete" onclick="cmdShowReport_Click" 
         class="btn btn-success"
           /><i  class="fa fa-trash-o;"></i>&nbsp;&nbsp;
        <asp:Button ID="btnClose" runat="server" type="button" Text="Close" onclick="btnClose_Click" 
           class="btn btn-danger"
           /><i  class="fa fa-trash-o;"></i>
                </div>
                </div>
              </div>
       

 </div>
 </div>
 </div>
 </div>





            


 <script src="js/jquery-1.8.3.min.js"
       type="text/javascript"></script>
 
          
</asp:Content>

